<?php if(!defined('A')) exit;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<?php
loadjs(array('jquery'),P_JS);
?>
<script>
$(document).ready(function(){
	var errtxt=$('#errtxt');
	var oktxt=$('#oktxt');
	var captcha=$('#captcha');
	$('#myform').submit(function(){
			if(errtxt.val().length<5 || errtxt.val().length>500){
				alert('错误内容长度在5-500之间！');
				errtxt.focus();
				return false;
			}
			if(oktxt.val().length<5 || oktxt.val().length>500){
				alert('修正建议长度在5-500之间！');
				oktxt.focus();
				return false;
			}
			if(captcha.val().length<4){
				alert('验证码不正确！');
				captcha.focus();
				return false;	
			}
			return true;
	});
	var imgcode=$('#imgcode');
	imgcode.css('cursor','pointer').hide();
	$('#captcha').focus(function(){
		if(imgcode.attr('src')==''){
			imgcode.attr('src','/code.php?'+Math.random()).fadeIn();
		}
	});
	imgcode.click(function(){
		$(this).attr('src','/code.php?'+Math.random());
	});
});
</script>
</head>
<body>
<?php echo $r['title'];?><br />
<form action="<?php echo url('arc','pick_error_');?>" method="post" id="myform">
错误类型：
<select name="type" id="type">
<?php echo form_select($type_arr,1);?>
</select>

<br />
错误内容：<textarea rows="5" cols="60" name="errtxt" id="errtxt"></textarea>(最少5字符,最长500字)<br />
修正建议：<textarea rows="5" cols="60" name="oktxt" id="oktxt"></textarea>(最少5字符,最长500字)<br />
验证码：<input type="text" name="captcha" value="" id="captcha" autocomplete="off" />&nbsp;<img src="" id="imgcode" title="点击更换" align="absmiddle" /><br />
<input name="submit" type="submit" value="提交" />
<input name="arc_id" type="hidden" value="<?php echo $r['id'];?>" />
<input name="title" type="hidden" value="<?php echo $r['title'];?>" />
</form>
</body>
</html>